import configparser

from PySide6.QtGui          import QScreen
from PySide6.QtWidgets      import QApplication, QWidget

from probecoupler     import ProbeCoupler


application = QApplication()
stylesheet = 'stylesheet.qss'
configuration = 'settings.conf'

# Setup stylesheet here
with open(stylesheet, 'r', encoding='utf-8') as file:
    application.setStyleSheet(file.read())

# Get screen size for application's window resize
screen = application.primaryScreen()
width = screen.size().width()
height = screen.size().height()

# Setup configurations here
adapter = configparser.ConfigParser(allow_no_value=True)
adapter.read(configuration)

# Setup application interface
interface = ProbeCoupler(width, height, adapter)
interface.show()

# Start infinite event loop
application.exec()
